﻿'use strict';
(function () {
    // 注意JS的绑定顺序，第一组绑定的文件可以用angular.module('MyControllers', []);，后续的文件只能用angular.module('MyControllers')
    var service = angular.module('MyServices');

    service.factory('photoService', ['$http', function (http) {
        var methods = {
            getPlanList: function (type) {
                return http.post('/ExamPlan/GetList/', { planType: type });
            },
            getList: function (planId, sceneId, roomId, statusId, parameter) {
                return http.post('/Photo/GetList/', { planId: planId, sceneId: sceneId, roomId: roomId, statusId: statusId, parameter: parameter });
            },
            savePhoto: function (planId, sceneId, examineeId, examCardNo, type, data) {
                return http.post('/Photo/SavePhoto/', { planId: planId, sceneId: sceneId, examineeId: examineeId, examCardNo: examCardNo, type: type, data: data });
            },

            getSceneList: function (planId, roomId, subjectId) {
                return http.post('/ExamPlan/GetSceneList/', { planId: planId, roomId: roomId, subjectId: subjectId });
            },
            getRoomList: function (planId, sceneId, subjectId) {
                return http.post('/ExamPlan/GetRoomList/', { planId: planId, sceneId: sceneId, subjectId: subjectId });
            }
        };
        return methods;
    }]);
})();